package pta;

import java.util.Scanner;

/**
 * @author tmh
 * @date 2024/12/18 19:29
 * @description
 */
public class T6_18打印大小写字母 {
    public static void main(String[] args) {
        int N, n;
        Scanner input = new Scanner(System.in);
        N = input.nextInt();
        n = input.nextInt();
        input.close();
        InterfaceA a = new Print();
        a.setN(N);
        a.printCapitalLetter();
        InterfaceB b = new Print();
        b.printLowercaseLetter(n);
    }

}

class Print implements InterfaceA, InterfaceB {
    private int m;

    @Override
    public void setN(int n) {
        m = n;
    }

    @Override
    public void printCapitalLetter() {
        if (m > 26) {
            m = m % 26;
        }
        for (int i = 0; i < m; i++) {
            System.out.println('a' + i);
        }

    }

    @Override
    public void printLowercaseLetter(int n) {
        if (n > 26) {
            n = n % 26;
        }
        for (int i = 0; i < n; i++) {
            System.out.println('a' + i);
        }
    }
}

interface InterfaceA {
    void setN(int n);

    void printCapitalLetter();

}

interface InterfaceB {
    void printLowercaseLetter(int n);
}